﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QingzimaDB;

namespace QingzimaLogicModel
{
    public class YonghuLM:JichuLM
    {
        
        #region 属性区
        /// <summary>
        /// 用户名
        /// </summary>
        public string YonghuMing { get; set; }
        /// <summary>
        /// 用户密码
        /// </summary>
        public string Mima { get; set; }
        /// <summary>
        /// 用户电话
        /// </summary>
        public string Dianhua { get; set; }
        #endregion

        #region 构造区
        public YonghuLM()
        {

        }

        public YonghuLM(YonghuDB dbModel)
        {
            ID = dbModel.ID;
            Key = dbModel.Key;
            CreatedTime = dbModel.CreatedTime;
            YonghuMing = dbModel.YonghuMing;
            Mima = dbModel.Mima;
            Dianhua = dbModel.Dianhua;
        }
        #endregion

        #region 方法区
        public void Save()
        {
            YonghuDB dbModel = new YonghuDB();
            dbModel.ID = ID;
            dbModel.Key = Key;
            dbModel.CreatedTime = CreatedTime;
            dbModel.YonghuMing = YonghuMing;
            dbModel.Mima = Mima;
            dbModel.Dianhua = Dianhua;
            dbModel.Save();
        }
        #endregion
    }
}
